package v1

import (
	"gin-admin/handler/v1/system"
	v1 "gin-admin/service/v1"
)

type HandlerApp struct {
	CaptchaHandler  system.CaptchaHandler
	UserHandler     system.UserHandler
	RoleHandler     system.RoleHandler
	UserRoleHandler system.UserRoleHandler
	MenuHandler     system.MenuHandler
}

func NewHandlerApp() *HandlerApp {
	return &HandlerApp{
		CaptchaHandler: system.CaptchaHandler{
			CaptchaService: v1.NewServiceApp().CaptchaService,
		},
		UserHandler: system.UserHandler{
			UserService: v1.NewServiceApp().UserService,
		},
		RoleHandler: system.RoleHandler{
			RoleService: v1.NewServiceApp().RoleService,
		},
		UserRoleHandler: system.UserRoleHandler{
			UserRoleService: v1.NewServiceApp().UserRoleService,
		},
		MenuHandler: system.MenuHandler{
			MenuService: v1.NewServiceApp().MenuService,
		},
	}
}
